package app.common.dao;
import java.util.ArrayList;
import java.util.List;

import cn.lily.com.container.data.Record;
import cn.lily.com.exception.YaconException;
import cn.lily.esb.framework.drivers.db.bean.ControlDAO;
public class Leo_can_report_fansBean extends ControlDAO implements Cloneable {
	private static final long serialVersionUID = 1L;
	public Leo_can_report_fansBean() throws YaconException {
		super();
		setTableName("LEO_CAN_REPORT_FANS");
	}
	String  fcan_detail_num;
	String  fcan_month;
	String  fcan_year;
	String  fcan_fans;
	String  fcan_rep_oper;
	String  fcan_rep_date;

	public void setCan_detail_num( String can_detail_num)throws YaconException{
		setFieldData("can_detail_num",can_detail_num,NUMBER);
		this.fcan_detail_num=can_detail_num;
	}

	public String getCan_detail_num(){
		if ( this.fcan_detail_num == null){
			return "";
		}
		else {
			return this.fcan_detail_num;
		}
	}

	public void setCan_month( String can_month)throws YaconException{
		setFieldData("can_month",can_month,TEXT);
		this.fcan_month=can_month;
	}

	public String getCan_month(){
		if ( this.fcan_month == null){
			return "";
		}
		else {
			return this.fcan_month;
		}
	}

	public void setCan_year( String can_year)throws YaconException{
		setFieldData("can_year",can_year,TEXT);
		this.fcan_year=can_year;
	}

	public String getCan_year(){
		if ( this.fcan_year == null){
			return "";
		}
		else {
			return this.fcan_year;
		}
	}

	public void setCan_fans( String can_fans)throws YaconException{
		setFieldData("can_fans",can_fans,TEXT);
		this.fcan_fans=can_fans;
	}

	public String getCan_fans(){
		if ( this.fcan_fans == null){
			return "";
		}
		else {
			return this.fcan_fans;
		}
	}

	public void setCan_rep_oper( String can_rep_oper)throws YaconException{
		setFieldData("can_rep_oper",can_rep_oper,TEXT);
		this.fcan_rep_oper=can_rep_oper;
	}

	public String getCan_rep_oper(){
		if ( this.fcan_rep_oper == null){
			return "";
		}
		else {
			return this.fcan_rep_oper;
		}
	}

	public void setCan_rep_date( String can_rep_date)throws YaconException{
		setFieldData("can_rep_date",can_rep_date,DATE);
		this.fcan_rep_date=can_rep_date;
	}

	public String getCan_rep_date(){
		if ( this.fcan_rep_date == null){
			return "";
		}
		else {
			return this.fcan_rep_date;
		}
	}

	public  List<Leo_can_report_fansBean> findListBeans(String sSqlWhere)throws YaconException {
		List<Leo_can_report_fansBean> listBeans = new ArrayList<Leo_can_report_fansBean>();
		findTable = findTableByWhere(sSqlWhere);
		while (findTable.next())
		{
			Leo_can_report_fansBean fDaoBean  = new Leo_can_report_fansBean();
			fDaoBean.fcan_detail_num = findTable.getString("can_detail_num");
			fDaoBean.fcan_month = findTable.getString("can_month");
			fDaoBean.fcan_year = findTable.getString("can_year");
			fDaoBean.fcan_fans = findTable.getString("can_fans");
			fDaoBean.fcan_rep_oper = findTable.getString("can_rep_oper");
			fDaoBean.fcan_rep_date = findTable.getString("can_rep_date");
			fDaoBean.operate_mode = "edit";
			listBeans.add(fDaoBean);
		}
		return listBeans;
	}

	public Leo_can_report_fansBean findBean(String sSqlWhere)throws YaconException {
		findTable = findTableByWhere(sSqlWhere);
		if (findTable.next())
		{
			Leo_can_report_fansBean fDaoBean  = new Leo_can_report_fansBean();
			fDaoBean.fcan_detail_num = findTable.getString("can_detail_num");
			fDaoBean.fcan_month = findTable.getString("can_month");
			fDaoBean.fcan_year = findTable.getString("can_year");
			fDaoBean.fcan_fans = findTable.getString("can_fans");
			fDaoBean.fcan_rep_oper = findTable.getString("can_rep_oper");
			fDaoBean.fcan_rep_date = findTable.getString("can_rep_date");
			fDaoBean.operate_mode = "edit";
			return fDaoBean;
		}else
			return null;
	}

	public void setViewRecord(Record viewRecord) throws YaconException{
		if (viewRecord.getString("can_detail_num") != null)
			setCan_detail_num(viewRecord.getString("can_detail_num"));
		if (viewRecord.getString("can_month") != null)
			setCan_month(viewRecord.getString("can_month"));
		if (viewRecord.getString("can_year") != null)
			setCan_year(viewRecord.getString("can_year"));
		if (viewRecord.getString("can_fans") != null)
			setCan_fans(viewRecord.getString("can_fans"));
		if (viewRecord.getString("can_rep_oper") != null)
			setCan_rep_oper(viewRecord.getString("can_rep_oper"));
		if (viewRecord.getString("can_rep_date") != null)
			setCan_rep_date(viewRecord.getString("can_rep_date"));
	}

}
